---
title: "Communicating in an eventful campaign: A case study of party press releases during the German federal election campaign 2021"
subtitle: "Figures and Tables"
author: "Christoph Ivanusch, Lisa Zehnter and Tobias Burst"
date: ""
output:
  pdf_document: default
---

```{r, setup, echo=FALSE, warning=FALSE, message=FALSE}

# chunk option defaults
knitr::opts_chunk$set(echo = FALSE, message = FALSE)

# packages
library(tidyverse)
library(ggplot2)
library(corrplot)
library(cowplot)
library(gridExtra)
library(xlsx)
library(stargazer)
library(knitr)
#library(kableExtra)
library(xtable)
library(lfe)
library(lmtest)
library(plm)
library(fixest)
library(ggpubr)

# custom function
printT <- function(x) {formatC(x, format="d", big.mark=",")}

# load main data set
data <- readRDS("Analysis_Data.RDS")
data$issue <- as.factor(data$issue)
data$month <- relevel(as.factor(data$month), "July")
data$party <- as.factor(data$party)

# load textual data
data_text_pr <- read.csv("Classified_Pressreleases_20210401_20210926.csv", 
                         encoding = "UTF-8")
data_text_pr$party <- gsub("GrÃ¼ne", "Grüne", data_text_pr$party)
data_text_man <- readRDS("Corpus_Manifestos_DE_2021.RDS")

# set party colors
party.colors = c("CDU/CSU" = "#2A2B2C", "SPD" = "#E00A1E", "AfD" = "#009EE0",
                 "FDP" = "#FBEE37", "Linke" = "#E2137D", "Grüne" = "#3E9940")

```

# Main paper

## Table 1

```{r table 1, warning=FALSE, message=FALSE, echo=FALSE, results='asis'}

data_text_pr$ppg <- str_detect(data_text_pr$sender, "Fraktion")

tab1 <- as.data.frame(table(data_text_pr$party[data_text_pr$ppg == FALSE]))
tab1 <- rbind(tab1, data.frame(Var1 = "Grüne", Freq = 0))
colnames(tab1) <- c("Party", "Party_office")
tab1 <- arrange(tab1, as.character(Party))

tab2 <- as.data.frame(table(data_text_pr$party[data_text_pr$ppg == TRUE]))
colnames(tab2) <- c("Party", "PPG")

tab <- left_join(tab1, tab2)

tab <- rbind(tab, data.frame(Party = "All",
                             Party_office = printT(sum(tab$Party_office)),
                             PPG = printT(sum(tab$PPG))))
colnames(tab) <- c("Party", "Party office", "PPG")

print(xtable(tab, align = c("l", "l", "c", "c"),
      caption = "Number of press releases per party and sender (01.04.2021-26.09.2021). \\label{tab1}"),
      hline.after = c(-1, 0, 6, 7), comment = FALSE, include.rownames = FALSE)

```

\newpage

## Figure 1

```{r figure 1, warning=FALSE, message=FALSE, echo=FALSE, fig.align="center", out.width="100%", fig.cap = "Number of press releases per week (April-September 2021). \\label{fig1}"}

# per party
ggplot(data_text_pr, aes(x=as.Date(date), fill = party)) + 
  geom_histogram(aes(y=..count..),, binwidth = 7, position="identity", alpha=0.5) + 
  geom_density(aes(y=..count..*7), alpha=.3) +
  facet_wrap(~party, ncol = 3) +
  xlab("date") +
  theme_bw() +
  scale_fill_manual(values=party.colors) +
  scale_x_date(date_labels = "%m/%y") +
  theme(axis.text.x = element_text(angle = 90)) +
  labs(x = "Date", y = "Count", fill = "Party")

```

\newpage

## Figure 2

```{r figure 2, warning=FALSE, message=FALSE, echo=FALSE, fig.align="center", out.width="100%", fig.cap = "Type of press release usage per party before and during the election campaign. \\label{fig2}"}

## create data frame
df <- data_text_pr
df$n <- 1

df <- df %>% 
  group_by(party, type, period) %>% 
  summarise(N = sum(n)) %>%
  group_by(party, period) %>%
  mutate(N_per_period = sum(N)) %>%
  mutate(percent = (N / N_per_period) * 100)

df$period <- relevel(as.factor(df$period), ref = "non-campaign")

## plot results
ggplot(df, aes(x=party, y=percent, fill=type)) +
  geom_bar(stat="identity") +
  facet_wrap(~period, nrow = 1) +
  theme_bw() +
  scale_fill_discrete(labels = c('Manifestos', 'Press releases'), name = "Text type") + 
  scale_fill_manual(values = c("grey60", "grey10")) +
  theme(axis.text.x = element_text(angle = 90)) +
  labs(x = "Party", y = "Percent", fill = "Type")

```

\newpage

## Figure 3

```{r figure 3, warning=FALSE, message=FALSE, echo=FALSE, fig.align="center", out.width="100%", fig.cap = "Comparison of issue salience in party manifestos and press releases (July-September) during the German federal election campaign in 2021. \\label{fig3}"}

# Issue salience in manifestos
df1 <- filter(data_text_man)
df1 <- as.data.frame(table(df1$issue))
df1$percent <- (df1$Freq / sum(df1$Freq)) * 100
df1$text_type <- "manifestos"
colnames(df1)[1] <- c("issue")
df1 <- df1[, c(1, 4, 3)] %>%
  filter(issue != "NA" & issue != "Political Authority")

# Issue salience in press releases
df_pr <- data_text_pr %>%
  filter(date > "2021-07-01") %>%
  filter(type == "policy-related")
df2 <- as.data.frame(table(df_pr$issue))
df2$percent <- (df2$Freq / sum(df2$Freq)) * 100
df2$text_type <- "press releases"
df2 <- df2[, c(1, 4, 3)]
colnames(df2)[1] <- c("issue")
df2$issue <- gsub("_", " ", df2$issue)

df <- rbind(df1, df2)

df %>%
  ggplot(aes(y = fct_rev(issue), x = percent, fill = text_type)) + 
  geom_bar(stat = "identity",  position=position_dodge()) +
  theme_bw() +
  ggtitle("") +
  labs(x = "Percent", y = "Issue") +
  xlim(0, 15) +
  scale_y_discrete(
    labels = c("Technology and Infrastructure" = "Technology and\nInfrastructure")) +
  #facet_grid(~text_type) +
  scale_fill_manual(values = c("grey60", "grey10")) +
  labs(x = "Party", y = "Percent", fill = "Text type")

```

\newpage

## Table 2

```{r table 2, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

reg1 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg2 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg3 <- feols(pressrelease_salience ~ 
                external_event + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg4 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                public_salience_lagged +
                external_event +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

fake_reg <- lm(pressrelease_salience ~ 
                 competitor_salience + 
                 public_salience_lagged +
                 external_event +
                 manifesto_salience +
                 government + pervote + # controls
                 pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Testing issue emphasis strategies in party press releases.", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          column.labels = c("(1)", "(2)", "(3)", "(4)"),
          model.numbers = FALSE,
          coef = list(c(as.numeric(reg1$coefficients)[1:2], NA, NA,
                      as.numeric(reg1$coefficients)[3:6]),
                      c(as.numeric(reg2$coefficients)[1], NA,
                        as.numeric(reg2$coefficients)[2], NA,
                        as.numeric(reg2$coefficients)[3:6]),
                      c(as.numeric(reg3$coefficients)[1], NA, NA,
                        as.numeric(reg3$coefficients)[2:6]),
                      as.numeric(reg4$coefficients)),
          se = list(c(as.numeric(reg1$se)[1:2], NA, NA,
                      as.numeric(reg1$se)[3:6]),
                    c(as.numeric(reg2$se)[1], NA,
                        as.numeric(reg2$se)[2], NA,
                        as.numeric(reg2$se)[3:6]),
                    c(as.numeric(reg3$se)[1], NA, NA,
                        as.numeric(reg3$se)[2:6]),
                    as.numeric(reg4$se)),
          p = list(c(as.numeric(reg1$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg1$coeftable[3:6, 4])),
                   c(as.numeric(reg2$coeftable[1, 4]), NA,
                        as.numeric(reg2$coeftable[2, 4]), NA,
                        as.numeric(reg2$coeftable[3:6, 4])),
                   c(as.numeric(reg3$coeftable[1, 4]), NA, NA,
                        as.numeric(reg3$coeftable[2:6, 4])),
                   as.numeric(reg4$coeftable[, 4])),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg1$nobs, reg2$nobs, reg3$nobs, reg4$nobs), 
                           c("R-squared", 
                             round(r2(reg1)[2], digits = 3), 
                             round(r2(reg2)[2], digits = 3),
                             round(r2(reg3)[2], digits = 3),
                             round(r2(reg4)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg1)[3], digits = 3), 
                             round(r2(reg2)[3], digits = 3),
                             round(r2(reg3)[3], digits = 3),
                             round(r2(reg4)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event", 
                               "Manifesto salience",
                               "Government status", 
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),          
          column.sep.width = "20pt",
          notes = "Standard errors clustered by party and issue.",
          label = "tab2")

```

\newpage

## Table 3

```{r table 3, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

reg5 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                poll_trend +
                competitor_salience*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg6 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                poll_trend +
                public_salience_lagged*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg7 <- feols(pressrelease_salience ~ 
                external_event + 
                poll_trend +
                external_event*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

fake_reg <- lm(pressrelease_salience ~ 
                competitor_salience + 
                public_salience_lagged +
                external_event +
                poll_trend +
                competitor_salience*poll_trend +
                public_salience_lagged*poll_trend +
                external_event*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Examining the influence of standing in polls on issue emphasis strategies in party press releases.", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          column.labels = c("(5)", "(6)", "(7)"),
          model.numbers = FALSE,
          coef = list(c(as.numeric(reg5$coefficients)[1:2], NA, NA,
                      as.numeric(reg5$coefficients)[3],
                      as.numeric(reg5$coefficients)[8], NA, NA,
                      as.numeric(reg5$coefficients)[4:7]),
                      c(as.numeric(reg6$coefficients)[1], NA,
                        as.numeric(reg6$coefficients)[2], NA,
                        as.numeric(reg6$coefficients)[3], NA,
                        as.numeric(reg6$coefficients)[8], NA,
                        as.numeric(reg6$coefficients)[4:7]),
                      c(as.numeric(reg7$coefficients)[1], NA, NA,
                        as.numeric(reg7$coefficients)[2:3], NA, NA,
                        as.numeric(reg7$coefficients)[8],
                        as.numeric(reg7$coefficients)[4:7])),
          se = list(c(as.numeric(reg5$se)[1:2], NA, NA,
                      as.numeric(reg5$se)[3],
                      as.numeric(reg5$se)[8], NA, NA,
                      as.numeric(reg5$se)[4:7]),
                      c(as.numeric(reg6$se)[1], NA,
                        as.numeric(reg6$se)[2], NA,
                        as.numeric(reg6$se)[3], NA,
                        as.numeric(reg6$se)[8], NA,
                        as.numeric(reg6$se)[4:7]),
                      c(as.numeric(reg7$se)[1], NA, NA,
                        as.numeric(reg7$se)[2:3], NA, NA,
                        as.numeric(reg7$se)[8],
                        as.numeric(reg7$se)[4:7])),
          p = list(c(as.numeric(reg5$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg5$coeftable[3, 4]),
                      as.numeric(reg5$coeftable[8, 4]), NA, NA,
                      as.numeric(reg5$coeftable[4:7, 4])),
                      c(as.numeric(reg6$coeftable[1, 4]), NA,
                        as.numeric(reg6$coeftable[2, 4]), NA,
                        as.numeric(reg6$coeftable[3, 4]), NA,
                        as.numeric(reg6$coeftable[8, 4]), NA,
                        as.numeric(reg6$coeftable[4:7, 4])),
                      c(as.numeric(reg7$coeftable[1, 4]), NA, NA,
                        as.numeric(reg7$coeftable[2:3, 4]), NA, NA,
                        as.numeric(reg7$coeftable[8, 4]),
                        as.numeric(reg7$coeftable[4:7, 4]))),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg5$nobs,
                             reg6$nobs, 
                             reg7$nobs), 
                           c("R-squared", 
                             round(r2(reg5)[2], digits = 3), 
                             round(r2(reg6)[2], digits = 3),
                             round(r2(reg7)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg5)[3], digits = 3), 
                             round(r2(reg6)[3], digits = 3),
                             round(r2(reg7)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event", 
                               "Poll trend",
                               "Competitor salience:Poll trend",
                               "Public salience (t-1):Poll trend",
                               "External event:Poll trend",
                               "Manifesto salience",
                               "Government status",
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),
          column.sep.width = "30pt",
          notes = "Standard errors clustered by party and issue.",
          label = "tab3")

```

\newpage

# Appendix

## A.1 Codebook

```{r a1, warning=FALSE, message=FALSE, echo=FALSE, results = "asis"}

codebook <- read.xlsx("Codebook.xlsx", sheetIndex = 1, colIndex = c(5:6)) %>%
  filter(!is.na(issue)) %>%
  group_by(issue) %>%
  summarise(MARPOR_codes = paste(sort(code), collapse = ", "))
colnames(codebook) <- c("Issue", "MARPOR codes")

# remove main code if subcategory code is mentioned
codebook$`MARPOR codes` <- gsub("416, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("103, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("201, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("202, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("305, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("416, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("601, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("605, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("606, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("607, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("608, ", "", codebook$`MARPOR codes`)
codebook$`MARPOR codes` <- gsub("703, ", "", codebook$`MARPOR codes`)

print(xtable(codebook, auto = TRUE,
             align = c("p{0.2in}", "p{2in}", "p{2.5in}"),
             caption = "Adapted codebook based on Manifesto Project (MARPOR) coding scheme. \\label{a1}"),
      caption.placement = "top",
      hline = c(-1, 0, 20), comment = FALSE, rownames = FALSE)


```

\newpage

## A.3 Additional validation statistics for BERT application

```{r a3, warning=FALSE, message=FALSE, echo=FALSE, results = "asis"}

source("02_Validation.R")

df_acc_issue <- round(df_acc_issue, digits = 2)
df_acc_issue <- rbind(df_acc_issue,
                      c(NA, NA, NA, NA, NA, NA, NA))
rownames(df_acc_issue)[19] <- c("Culture")
df_acc_issue <- df_acc_issue[order(rownames(df_acc_issue)), ]

colnames(df_acc_issue) <- c("TP", "FP", "TN", "FN",
                            "Precision", "Recall", "F1")

print(xtable(df_acc_issue[, 5:7], auto = TRUE,
             align = c("l", "c", "c", "c"),
             caption = "Precision, recall and f1-scores achieved by the computer-based topic classification of press releases. \\label{a3}"),
      caption.placement = "top",
      comment = FALSE, rownames = FALSE, zero.print = "NA")


```

\newpage

## A.4 Press releases by party office and parliamentary party group

```{r a4, warning=FALSE, message=FALSE, fig.align="center", out.width="100%", fig.cap = "Distribution of press releases published by party office and parliamentary party group (PPG) before and during the election campaign."}

# type of sender (party vs PPG) during "campaign" and "routine-times"

# create data frame
df <- data_text_pr
df$n <- 1

df <- df %>% 
  group_by(party, sender, period) %>% 
  summarise(N = sum(n)) %>%
  group_by(party, period) %>%
  mutate(N_per_period = sum(N)) %>%
  mutate(percent = (N / N_per_period) * 100)

df$source <- ifelse(grepl("(?i)Fraktion", df$sender), "PPG", "Party")

df$period <- relevel(as.factor(df$period), ref = "non-campaign")

ggplot(df, aes(x=party, y=percent, fill=source)) +
  geom_bar(stat="identity") +
  facet_wrap(~period, nrow = 1) +
  theme_bw() +
  scale_fill_manual(values = c("grey60", "grey10")) +
  theme(axis.text.x = element_text(angle = 90)) +
  labs(x = "Party", y = "Percent", fill = "Source")

```

\newpage

## A.5 Party issue agendas in manifestos and press releases

```{r a5, warning=FALSE, message=FALSE, echo=FALSE, fig.align="center", out.width="100%", fig.cap = "Correlation plots between manifesto salience and press release salience per party."}

data$label <- paste0(data$issue, "_", data$month)

ggplot(data, aes(x = manifesto_salience, 
                 y = pressrelease_salience)) +
  geom_point(aes(color = month), alpha = 0.5) +
  geom_smooth(method = "lm", se = TRUE, color = "grey20") + 
  stat_cor(method="pearson") +
  facet_wrap(~ party, nrow = 3) +
  geom_abline(intercept = 0, slope = 1, linetype = "dashed") +
  #scale_x_continuous(expand = c(0, 0), limits = c(0, 20)) +
  #scale_y_continuous(limits = c(0, 40)) +
  theme_bw() +
  labs(x = "Manifesto salience", y = "Press release salience", color = "Month")

```

\newpage

```{r a5.2, warning=FALSE, message=FALSE, echo=FALSE, results = "asis"}

# manifestos
data1 <- data_text_man %>%
  filter(date >= "2021-07-01")
df1 <- as.data.frame(table(data1$issue, data1$party)) %>%
  reshape(idvar = "Var1", timevar = "Var2", direction = "wide")
colnames(df1) <- c("issue", "AfD", "CDU/CSU", "FDP", "Grüne", "Linke", "SPD")

df1$AfD <- df1$AfD / sum(df1$AfD) * 100
df1$`CDU/CSU` <- df1$`CDU/CSU` / sum(df1$`CDU/CSU`) * 100
df1$FDP <- df1$FDP / sum(df1$FDP) * 100
df1$Grüne <- df1$Grüne / sum(df1$Grüne) * 100
df1$Linke <- df1$Linke / sum(df1$Linke) * 100
df1$SPD <- df1$SPD / sum(df1$SPD) * 100

df1 <- filter(df1, issue != "NA" & issue != "Political Authority")

df1$issue <- gsub("_", " ", df1$issue)
rownames(df1) <- df1$issue
df1$issue <- NULL
df1 <- round(df1, digits = 2)

# table
print(xtable(df1, auto = TRUE,
             align = c("l", "c", "c", "c", "c", "c", "c"),
             caption = "Issue salience (in percent) per party in manifestos. \\label{a5.2}"),
      caption.placement = "top",
      comment = FALSE, rownames = FALSE)

```

\newpage

```{r a5.3, warning=FALSE, message=FALSE, echo=FALSE, results = "asis"}

# press releases
data2 <- data_text_pr %>%
  filter(date >= "2021-07-01") %>%
  filter(type == "policy-related")
df2 <- as.data.frame(table(data2$issue, data2$party)) %>%
  reshape(idvar = "Var1", timevar = "Var2", direction = "wide")
colnames(df2) <- c("issue", "AfD", "CDU/CSU", "FDP", "Grüne", "Linke", "SPD")

df2$AfD <- df2$AfD / sum(df2$AfD) * 100
df2$`CDU/CSU` <- df2$`CDU/CSU` / sum(df2$`CDU/CSU`) * 100
df2$FDP <- df2$FDP / sum(df2$FDP) * 100
df2$Grüne <- df2$Grüne / sum(df2$Grüne) * 100
df2$Linke <- df2$Linke / sum(df2$Linke) * 100
df2$SPD <- df2$SPD / sum(df2$SPD) * 100

df2$issue <- gsub("_", " ", df2$issue)
rownames(df2) <- df2$issue
df2$issue <- NULL
df2 <- round(df2, digits = 2)

# table
print(xtable(df2, auto = TRUE,
             align = c("l", "c", "c", "c", "c", "c", "c"),
             caption = "Issue salience (in percent) per party in press releases (July-September 2021). \\label{a5.3}"), 
      caption.placement = "top",
      comment = FALSE, rownames = FALSE)


```

\newpage

## A.6 Correlation between variables of interest

```{r a6, warning=FALSE, message=FALSE, echo=FALSE, fig.align="center", out.width="100%", fig.cap = "Correlation matrix for variables of interest."}

corr_matrix <- cor(data[, c("pressrelease_salience", 
                            "pressrelease_salience_lagged", 
                            "competitor_salience",
                            "public_salience_lagged",
                            "external_event",
                            "manifesto_salience",
                            "poll_trend")])
colnames(corr_matrix) <- c("Press release salience", 
                           "Press release salience (t-1)", 
                           "Competitor salience", 
                           "Public salience (t-1)",
                           "External event", 
                           "Manifesto salience",
                           "Poll trend")
rownames(corr_matrix) <- c("Press release salience", 
                           "Press release salience (t-1)", 
                           "Competitor salience", 
                           "Public salience (t-1)",
                           "External event", 
                           "Manifesto salience",
                           "Poll trend")

corrplot(corr_matrix, 
         method = "color",
         addCoef.col = 1,
         number.cex = 0.5,
         tl.col = "black",
         tl.cex = 0.5,
         cl.cex = 0.5,
         addgrid.col = "black", 
         col = colorRampPalette(c("blue","white","red"))(100))

```

\newpage

## A.7 Regression models with SPD excluded as outlier

```{r a7.1, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

data_sub <- filter(data, party != "SPD")

reg1 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data_sub)

reg2 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data_sub)

reg3 <- feols(pressrelease_salience ~ 
                external_event + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data_sub)

reg4 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                public_salience_lagged +
                external_event +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data_sub)

fake_reg <- lm(pressrelease_salience ~ 
                 competitor_salience + 
                 public_salience_lagged +
                 external_event +
                 manifesto_salience +
                 government + pervote + # controls
                 pressrelease_salience_lagged,
               data = data_sub)

stargazer(list(fake_reg, fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Testing issue emphasis strategies in party press releases (SPD excluded as outlier).", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          coef = list(c(as.numeric(reg1$coefficients)[1:2], NA, NA,
                      as.numeric(reg1$coefficients)[3:6]),
                      c(as.numeric(reg2$coefficients)[1], NA,
                        as.numeric(reg2$coefficients)[2], NA,
                        as.numeric(reg2$coefficients)[3:6]),
                      c(as.numeric(reg3$coefficients)[1], NA, NA,
                        as.numeric(reg3$coefficients)[2:6]),
                      as.numeric(reg4$coefficients)),
          se = list(c(as.numeric(reg1$se)[1:2], NA, NA,
                      as.numeric(reg1$se)[3:6]),
                    c(as.numeric(reg2$se)[1], NA,
                        as.numeric(reg2$se)[2], NA,
                        as.numeric(reg2$se)[3:6]),
                    c(as.numeric(reg3$se)[1], NA, NA,
                        as.numeric(reg3$se)[2:6]),
                    as.numeric(reg4$se)),
          p = list(c(as.numeric(reg1$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg1$coeftable[3:6, 4])),
                   c(as.numeric(reg2$coeftable[1, 4]), NA,
                        as.numeric(reg2$coeftable[2, 4]), NA,
                        as.numeric(reg2$coeftable[3:6, 4])),
                   c(as.numeric(reg3$coeftable[1, 4]), NA, NA,
                        as.numeric(reg3$coeftable[2:6, 4])),
                   as.numeric(reg4$coeftable[, 4])),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg1$nobs, reg2$nobs, reg3$nobs, reg4$nobs), 
                           c("R-squared", 
                             round(r2(reg1)[2], digits = 3), 
                             round(r2(reg2)[2], digits = 3),
                             round(r2(reg3)[2], digits = 3),
                             round(r2(reg4)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg1)[3], digits = 3), 
                             round(r2(reg2)[3], digits = 3),
                             round(r2(reg3)[3], digits = 3),
                             round(r2(reg4)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event", 
                               "Manifesto salience",
                               "Government status", 
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),      
          column.sep.width = "20pt",
          notes = "Standard errors clustered by party and issue.",
          label = "a7.1")

```

\newpage

```{r a7.2, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

data_sub <- filter(data, party != "SPD")

reg5 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                poll_trend +
                competitor_salience*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data_sub)

reg6 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                poll_trend +
                public_salience_lagged*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data_sub)

reg7 <- feols(pressrelease_salience ~ 
                external_event + 
                poll_trend +
                external_event*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data_sub)

fake_reg <- lm(pressrelease_salience ~ 
                competitor_salience + 
                public_salience_lagged +
                external_event +
                poll_trend +
                competitor_salience*poll_trend +
                public_salience_lagged*poll_trend +
                external_event*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
               data = data_sub)

stargazer(list(fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Examining the influence of standing in polls on issue emphasis strategies in party press releases (SPD excluded as outlier).", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          coef = list(c(as.numeric(reg5$coefficients)[1:2], NA, NA,
                      as.numeric(reg5$coefficients)[3],
                      as.numeric(reg5$coefficients)[8], NA, NA,
                      as.numeric(reg5$coefficients)[4:7]),
                      c(as.numeric(reg6$coefficients)[1], NA,
                        as.numeric(reg6$coefficients)[2], NA,
                        as.numeric(reg6$coefficients)[3], NA,
                        as.numeric(reg6$coefficients)[8], NA,
                        as.numeric(reg6$coefficients)[4:7]),
                      c(as.numeric(reg7$coefficients)[1], NA, NA,
                        as.numeric(reg7$coefficients)[2:3], NA, NA,
                        as.numeric(reg7$coefficients)[8],
                        as.numeric(reg7$coefficients)[4:7])),
          se = list(c(as.numeric(reg5$se)[1:2], NA, NA,
                      as.numeric(reg5$se)[3],
                      as.numeric(reg5$se)[8], NA, NA,
                      as.numeric(reg5$se)[4:7]),
                      c(as.numeric(reg6$se)[1], NA,
                        as.numeric(reg6$se)[2], NA,
                        as.numeric(reg6$se)[3], NA,
                        as.numeric(reg6$se)[8], NA,
                        as.numeric(reg6$se)[4:7]),
                      c(as.numeric(reg7$se)[1], NA, NA,
                        as.numeric(reg7$se)[2:3], NA, NA,
                        as.numeric(reg7$se)[8],
                        as.numeric(reg7$se)[4:7])),
          p = list(c(as.numeric(reg5$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg5$coeftable[3, 4]),
                      as.numeric(reg5$coeftable[8, 4]), NA, NA,
                      as.numeric(reg5$coeftable[4:7, 4])),
                      c(as.numeric(reg6$coeftable[1, 4]), NA,
                        as.numeric(reg6$coeftable[2, 4]), NA,
                        as.numeric(reg6$coeftable[3, 4]), NA,
                        as.numeric(reg6$coeftable[8, 4]), NA,
                        as.numeric(reg6$coeftable[4:7, 4])),
                      c(as.numeric(reg7$coeftable[1, 4]), NA, NA,
                        as.numeric(reg7$coeftable[2:3, 4]), NA, NA,
                        as.numeric(reg7$coeftable[8, 4]),
                        as.numeric(reg7$coeftable[4:7, 4]))),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg4$nobs,
                             reg5$nobs, 
                             reg6$nobs), 
                           c("R-squared", 
                             round(r2(reg5)[2], digits = 3), 
                             round(r2(reg6)[2], digits = 3),
                             round(r2(reg7)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg5)[3], digits = 3), 
                             round(r2(reg6)[3], digits = 3),
                             round(r2(reg7)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event", 
                               "Poll trend",
                               "Competitor salience:Poll trend",
                               "Public salience (t-1):Poll trend",
                               "External event:Poll trend",
                               "Manifesto salience",
                               "Government status",
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),
          column.sep.width = "30pt",
          notes = "Standard errors clustered by party and issue.",
          label = "a7.2")

```

\newpage

## A.8 Regression models with time lag for *competitor salience*

```{r a8.1, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

reg1 <- feols(pressrelease_salience ~ 
                competitor_salience_lagged + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg2 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg3 <- feols(pressrelease_salience ~ 
                external_event + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg4 <- feols(pressrelease_salience ~ 
                competitor_salience_lagged + 
                public_salience_lagged +
                external_event +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

fake_reg <- lm(pressrelease_salience ~ 
                 competitor_salience_lagged + 
                 public_salience_lagged +
                 external_event +
                 manifesto_salience +
                 government + pervote + # controls
                 pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Testing issue emphasis strategies in party press releases (models with lags for competitor salience).", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          coef = list(c(as.numeric(reg1$coefficients)[1:2], NA, NA,
                      as.numeric(reg1$coefficients)[3:6]),
                      c(as.numeric(reg2$coefficients)[1], NA,
                        as.numeric(reg2$coefficients)[2], NA,
                        as.numeric(reg2$coefficients)[3:6]),
                      c(as.numeric(reg3$coefficients)[1], NA, NA,
                        as.numeric(reg3$coefficients)[2:6]),
                      as.numeric(reg4$coefficients)),
          se = list(c(as.numeric(reg1$se)[1:2], NA, NA,
                      as.numeric(reg1$se)[3:6]),
                    c(as.numeric(reg2$se)[1], NA,
                        as.numeric(reg2$se)[2], NA,
                        as.numeric(reg2$se)[3:6]),
                    c(as.numeric(reg3$se)[1], NA, NA,
                        as.numeric(reg3$se)[2:6]),
                    as.numeric(reg4$se)),
          p = list(c(as.numeric(reg1$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg1$coeftable[3:6, 4])),
                   c(as.numeric(reg2$coeftable[1, 4]), NA,
                        as.numeric(reg2$coeftable[2, 4]), NA,
                        as.numeric(reg2$coeftable[3:6, 4])),
                   c(as.numeric(reg3$coeftable[1, 4]), NA, NA,
                        as.numeric(reg3$coeftable[2:6, 4])),
                   as.numeric(reg4$coeftable[, 4])),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg1$nobs, reg2$nobs, reg3$nobs, reg4$nobs), 
                           c("R-squared", 
                             round(r2(reg1)[2], digits = 3), 
                             round(r2(reg2)[2], digits = 3),
                             round(r2(reg3)[2], digits = 3),
                             round(r2(reg4)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg1)[3], digits = 3), 
                             round(r2(reg2)[3], digits = 3),
                             round(r2(reg3)[3], digits = 3),
                             round(r2(reg4)[3], digits = 3))),
          covariate.labels = c("Competitor salience (t-1)",
                               "Public salience (t-1)",
                               "External event", 
                               "Manifesto salience",
                               "Government status", 
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),     
          column.sep.width = "20pt",
          notes = "Standard errors clustered by party and issue.",
          label = "a8.1")


```

\newpage

```{r a8.2, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

reg5 <- feols(pressrelease_salience ~ 
                competitor_salience_lagged + 
                poll_trend +
                competitor_salience_lagged*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg6 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                poll_trend +
                public_salience_lagged*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg7 <- feols(pressrelease_salience ~ 
                external_event + 
                poll_trend +
                external_event*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

fake_reg <- lm(pressrelease_salience ~ 
                competitor_salience_lagged + 
                public_salience_lagged +
                external_event +
                poll_trend +
                competitor_salience_lagged*poll_trend +
                public_salience_lagged*poll_trend +
                external_event*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Examining the influence of standing in polls on issue emphasis strategies in party press releases (models with lags for competitor salience).", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          coef = list(c(as.numeric(reg5$coefficients)[1:2], NA, NA,
                      as.numeric(reg5$coefficients)[3],
                      as.numeric(reg5$coefficients)[8], NA, NA,
                      as.numeric(reg5$coefficients)[4:7]),
                      c(as.numeric(reg6$coefficients)[1], NA,
                        as.numeric(reg6$coefficients)[2], NA,
                        as.numeric(reg6$coefficients)[3], NA,
                        as.numeric(reg6$coefficients)[8], NA,
                        as.numeric(reg6$coefficients)[4:7]),
                      c(as.numeric(reg7$coefficients)[1], NA, NA,
                        as.numeric(reg7$coefficients)[2:3], NA, NA,
                        as.numeric(reg7$coefficients)[8],
                        as.numeric(reg7$coefficients)[4:7])),
          se = list(c(as.numeric(reg5$se)[1:2], NA, NA,
                      as.numeric(reg5$se)[3],
                      as.numeric(reg5$se)[8], NA, NA,
                      as.numeric(reg5$se)[4:7]),
                      c(as.numeric(reg6$se)[1], NA,
                        as.numeric(reg6$se)[2], NA,
                        as.numeric(reg6$se)[3], NA,
                        as.numeric(reg6$se)[8], NA,
                        as.numeric(reg6$se)[4:7]),
                      c(as.numeric(reg7$se)[1], NA, NA,
                        as.numeric(reg7$se)[2:3], NA, NA,
                        as.numeric(reg7$se)[8],
                        as.numeric(reg7$se)[4:7])),
          p = list(c(as.numeric(reg5$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg5$coeftable[3, 4]),
                      as.numeric(reg5$coeftable[8, 4]), NA, NA,
                      as.numeric(reg5$coeftable[4:7, 4])),
                      c(as.numeric(reg6$coeftable[1, 4]), NA,
                        as.numeric(reg6$coeftable[2, 4]), NA,
                        as.numeric(reg6$coeftable[3, 4]), NA,
                        as.numeric(reg6$coeftable[8, 4]), NA,
                        as.numeric(reg6$coeftable[4:7, 4])),
                      c(as.numeric(reg7$coeftable[1, 4]), NA, NA,
                        as.numeric(reg7$coeftable[2:3, 4]), NA, NA,
                        as.numeric(reg7$coeftable[8, 4]),
                        as.numeric(reg7$coeftable[4:7, 4]))),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg5$nobs, 
                             reg6$nobs, 
                             reg7$nobs), 
                           c("R-squared", 
                             round(r2(reg5)[2], digits = 3), 
                             round(r2(reg6)[2], digits = 3),
                             round(r2(reg7)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg5)[3], digits = 3), 
                             round(r2(reg6)[3], digits = 3),
                             round(r2(reg7)[3], digits = 3))),
          covariate.labels = c("Competitor salience (t-1)",
                               "Public salience (t-1)",
                               "External event", 
                               "Poll trend",
                               "Competitor salience (t-1):Poll trend",
                               "Public salience (t-1):Poll trend",
                               "External event:Poll trend",
                               "Manifesto salience",
                               "Government status",
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),
          column.sep.width = "30pt",
          notes = "Standard errors clustered by party and issue.",
          label = "a8.2")

```


\newpage

## A.9 Regression models with time lag for *external event*

```{r a9.1, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

reg1 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg2 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg3 <- feols(pressrelease_salience ~ 
                external_event_lagged + 
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg4 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                public_salience_lagged +
                external_event_lagged +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

fake_reg <- lm(pressrelease_salience ~ 
                 competitor_salience + 
                 public_salience_lagged +
                 external_event_lagged +
                 manifesto_salience +
                 government + pervote + # controls
                 pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Testing issue emphasis strategies in party press releases (models with lags for external event).", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          coef = list(c(as.numeric(reg1$coefficients)[1:2], NA, NA,
                      as.numeric(reg1$coefficients)[3:6]),
                      c(as.numeric(reg2$coefficients)[1], NA,
                        as.numeric(reg2$coefficients)[2], NA,
                        as.numeric(reg2$coefficients)[3:6]),
                      c(as.numeric(reg3$coefficients)[1], NA, NA,
                        as.numeric(reg3$coefficients)[2:6]),
                      as.numeric(reg4$coefficients)),
          se = list(c(as.numeric(reg1$se)[1:2], NA, NA,
                      as.numeric(reg1$se)[3:6]),
                    c(as.numeric(reg2$se)[1], NA,
                        as.numeric(reg2$se)[2], NA,
                        as.numeric(reg2$se)[3:6]),
                    c(as.numeric(reg3$se)[1], NA, NA,
                        as.numeric(reg3$se)[2:6]),
                    as.numeric(reg4$se)),
          p = list(c(as.numeric(reg1$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg1$coeftable[3:6, 4])),
                   c(as.numeric(reg2$coeftable[1, 4]), NA,
                        as.numeric(reg2$coeftable[2, 4]), NA,
                        as.numeric(reg2$coeftable[3:6, 4])),
                   c(as.numeric(reg3$coeftable[1, 4]), NA, NA,
                        as.numeric(reg3$coeftable[2:6, 4])),
                   as.numeric(reg4$coeftable[, 4])),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg1$nobs, reg2$nobs, reg3$nobs, reg4$nobs), 
                           c("R-squared", 
                             round(r2(reg1)[2], digits = 3), 
                             round(r2(reg2)[2], digits = 3),
                             round(r2(reg3)[2], digits = 3),
                             round(r2(reg4)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg1)[3], digits = 3), 
                             round(r2(reg2)[3], digits = 3),
                             round(r2(reg3)[3], digits = 3),
                             round(r2(reg4)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event (t-1)", 
                               "Manifesto salience",
                               "Government status", 
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),     
          column.sep.width = "20pt",
          notes = "Standard errors clustered by party and issue.",
          label = "a9.1")


```

\newpage

```{r a9.2, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

reg5 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                poll_trend +
                competitor_salience*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg6 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                poll_trend +
                public_salience_lagged*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg7 <- feols(pressrelease_salience ~ 
                external_event_lagged + 
                poll_trend +
                external_event_lagged*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

fake_reg <- lm(pressrelease_salience ~ 
                competitor_salience + 
                public_salience_lagged +
                external_event_lagged +
                poll_trend +
                competitor_salience*poll_trend +
                public_salience_lagged*poll_trend +
                external_event_lagged*poll_trend +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Examining the influence of standing in polls on issue emphasis strategies in party press releases (models with lags for external event).", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          coef = list(c(as.numeric(reg5$coefficients)[1:2], NA, NA,
                      as.numeric(reg5$coefficients)[3],
                      as.numeric(reg5$coefficients)[8], NA, NA,
                      as.numeric(reg5$coefficients)[4:7]),
                      c(as.numeric(reg6$coefficients)[1], NA,
                        as.numeric(reg6$coefficients)[2], NA,
                        as.numeric(reg6$coefficients)[3], NA,
                        as.numeric(reg6$coefficients)[8], NA,
                        as.numeric(reg6$coefficients)[4:7]),
                      c(as.numeric(reg7$coefficients)[1], NA, NA,
                        as.numeric(reg7$coefficients)[2:3], NA, NA,
                        as.numeric(reg7$coefficients)[8],
                        as.numeric(reg7$coefficients)[4:7])),
          se = list(c(as.numeric(reg5$se)[1:2], NA, NA,
                      as.numeric(reg5$se)[3],
                      as.numeric(reg5$se)[8], NA, NA,
                      as.numeric(reg5$se)[4:7]),
                      c(as.numeric(reg6$se)[1], NA,
                        as.numeric(reg6$se)[2], NA,
                        as.numeric(reg6$se)[3], NA,
                        as.numeric(reg6$se)[8], NA,
                        as.numeric(reg6$se)[4:7]),
                      c(as.numeric(reg7$se)[1], NA, NA,
                        as.numeric(reg7$se)[2:3], NA, NA,
                        as.numeric(reg7$se)[8],
                        as.numeric(reg7$se)[4:7])),
          p = list(c(as.numeric(reg5$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg5$coeftable[3, 4]),
                      as.numeric(reg5$coeftable[8, 4]), NA, NA,
                      as.numeric(reg5$coeftable[4:7, 4])),
                      c(as.numeric(reg6$coeftable[1, 4]), NA,
                        as.numeric(reg6$coeftable[2, 4]), NA,
                        as.numeric(reg6$coeftable[3, 4]), NA,
                        as.numeric(reg6$coeftable[8, 4]), NA,
                        as.numeric(reg6$coeftable[4:7, 4])),
                      c(as.numeric(reg7$coeftable[1, 4]), NA, NA,
                        as.numeric(reg7$coeftable[2:3, 4]), NA, NA,
                        as.numeric(reg7$coeftable[8, 4]),
                        as.numeric(reg7$coeftable[4:7, 4]))),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg5$nobs, 
                             reg6$nobs, 
                             reg7$nobs), 
                           c("R-squared", 
                             round(r2(reg5)[2], digits = 3), 
                             round(r2(reg6)[2], digits = 3),
                             round(r2(reg7)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg5)[3], digits = 3), 
                             round(r2(reg6)[3], digits = 3),
                             round(r2(reg7)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event (t-1)", 
                               "Poll trend",
                               "Competitor salience:Poll trend",
                               "Public salience (t-1):Poll trend",
                               "External event (t-1):Poll trend",
                               "Manifesto salience",
                               "Government status",
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),
          column.sep.width = "30pt",
          notes = "Standard errors clustered by party and issue.",
          label = "a9.2")

```

\newpage

## A.10 Regression model with time lag for *poll trend*

```{r a10, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

reg5 <- feols(pressrelease_salience ~ 
                competitor_salience + 
                poll_trend_lagged +
                competitor_salience*poll_trend_lagged +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg6 <- feols(pressrelease_salience ~ 
                public_salience_lagged + 
                poll_trend_lagged +
                public_salience_lagged*poll_trend_lagged +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

reg7 <- feols(pressrelease_salience ~ 
                external_event + 
                poll_trend_lagged +
                external_event*poll_trend_lagged +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
              cluster = ~ party + issue,
              data = data)

fake_reg <- lm(pressrelease_salience ~ 
                competitor_salience + 
                public_salience_lagged +
                external_event +
                poll_trend_lagged +
                competitor_salience*poll_trend_lagged +
                public_salience_lagged*poll_trend_lagged +
                external_event*poll_trend_lagged +
                manifesto_salience +
                government + pervote + # controls
                pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Examining the influence of standing in polls on issue emphasis strategies in party press releases (models with lags for poll trend).", 
          keep.stat = c("n", "rsq", "adj.rsq"),
          dep.var.labels = "Press release salience (t0)",
          coef = list(c(as.numeric(reg5$coefficients)[1:2], NA, NA,
                      as.numeric(reg5$coefficients)[3],
                      as.numeric(reg5$coefficients)[8], NA, NA,
                      as.numeric(reg5$coefficients)[4:7]),
                      c(as.numeric(reg6$coefficients)[1], NA,
                        as.numeric(reg6$coefficients)[2], NA,
                        as.numeric(reg6$coefficients)[3], NA,
                        as.numeric(reg6$coefficients)[8], NA,
                        as.numeric(reg6$coefficients)[4:7]),
                      c(as.numeric(reg7$coefficients)[1], NA, NA,
                        as.numeric(reg7$coefficients)[2:3], NA, NA,
                        as.numeric(reg7$coefficients)[8],
                        as.numeric(reg7$coefficients)[4:7])),
          se = list(c(as.numeric(reg5$se)[1:2], NA, NA,
                      as.numeric(reg5$se)[3],
                      as.numeric(reg5$se)[8], NA, NA,
                      as.numeric(reg5$se)[4:7]),
                      c(as.numeric(reg6$se)[1], NA,
                        as.numeric(reg6$se)[2], NA,
                        as.numeric(reg6$se)[3], NA,
                        as.numeric(reg6$se)[8], NA,
                        as.numeric(reg6$se)[4:7]),
                      c(as.numeric(reg7$se)[1], NA, NA,
                        as.numeric(reg7$se)[2:3], NA, NA,
                        as.numeric(reg7$se)[8],
                        as.numeric(reg7$se)[4:7])),
          p = list(c(as.numeric(reg5$coeftable[1:2, 4]), NA, NA,
                      as.numeric(reg5$coeftable[3, 4]),
                      as.numeric(reg5$coeftable[8, 4]), NA, NA,
                      as.numeric(reg5$coeftable[4:7, 4])),
                      c(as.numeric(reg6$coeftable[1, 4]), NA,
                        as.numeric(reg6$coeftable[2, 4]), NA,
                        as.numeric(reg6$coeftable[3, 4]), NA,
                        as.numeric(reg6$coeftable[8, 4]), NA,
                        as.numeric(reg6$coeftable[4:7, 4])),
                      c(as.numeric(reg7$coeftable[1, 4]), NA, NA,
                        as.numeric(reg7$coeftable[2:3, 4]), NA, NA,
                        as.numeric(reg7$coeftable[8, 4]),
                        as.numeric(reg7$coeftable[4:7, 4]))),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg5$nobs, 
                             reg6$nobs, 
                             reg7$nobs), 
                           c("R-squared", 
                             round(r2(reg5)[2], digits = 3), 
                             round(r2(reg6)[2], digits = 3),
                             round(r2(reg7)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg5)[3], digits = 3), 
                             round(r2(reg6)[3], digits = 3),
                             round(r2(reg7)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event", 
                               "Poll trend (t-1)",
                               "Competitor salience:Poll trend (t-1)",
                               "Public salience (t-1):Poll trend (t-1)",
                               "External event:Poll trend (t-1)",
                               "Manifesto salience",
                               "Government status",
                               "Party size",
                               "Press release salience (t-1)",
                               "Constant"),
          column.sep.width = "30pt",
          notes = "Standard errors clustered by party and issue.",
          label = "a10")

```

\newpage

## A.11 Regression models per party

```{r a11, warning=FALSE, message=FALSE, echo=FALSE, results="asis"}

# model per party
df_afd <- filter(data, party == "AfD")
reg_afd <- feols(pressrelease_salience ~
                   competitor_salience +
                   public_salience_lagged +
                   external_event +
                   manifesto_salience +
                   pressrelease_salience_lagged,
                 cluster = ~ issue,
                 df_afd)

df_cducsu <- filter(data, party == "CDU/CSU")
reg_cducsu <- feols(pressrelease_salience ~
                      competitor_salience +
                      public_salience_lagged +
                      external_event +
                      manifesto_salience +
                      pressrelease_salience_lagged,
                    cluster = ~ issue,
                    df_cducsu)

df_fdp <- filter(data, party == "FDP")
reg_fdp <- feols(pressrelease_salience ~
                   competitor_salience +
                   public_salience_lagged +
                   external_event +
                   manifesto_salience +
                   pressrelease_salience_lagged,
                 cluster = ~ issue,
                 df_fdp)

df_greens <- filter(data, party == "Grüne")
reg_greens <- feols(pressrelease_salience ~
                      competitor_salience +
                      public_salience_lagged +
                      external_event +
                      manifesto_salience +
                      pressrelease_salience_lagged,
                    cluster = ~ issue,
                    df_greens)

df_linke <- filter(data, party == "Linke")
reg_linke <- feols(pressrelease_salience ~
                     competitor_salience +
                     public_salience_lagged +
                     external_event +
                     manifesto_salience +
                     pressrelease_salience_lagged,
                   cluster = ~ issue,
                   df_linke)

df_spd <- filter(data, party == "SPD")
reg_spd <- feols(pressrelease_salience ~
                   competitor_salience +
                   public_salience_lagged +
                   external_event +
                   manifesto_salience +
                   pressrelease_salience_lagged,
                 cluster = ~ issue,
                 df_spd)

fake_reg <- lm(pressrelease_salience ~ 
                 competitor_salience + 
                 public_salience_lagged +
                 external_event +
                 manifesto_salience +
                 pressrelease_salience_lagged,
               data = data)

stargazer(list(fake_reg, fake_reg, fake_reg, fake_reg, fake_reg, fake_reg), 
          type = "latex", 
          header = FALSE, 
          title = "Testing issue emphasis strategies in party press releases per party.", 
          dep.var.labels = "Press release salience (t0)",
          coef = list(as.numeric(reg_afd$coefficients),
                      as.numeric(reg_cducsu$coefficients),
                      as.numeric(reg_fdp$coefficients),
                      as.numeric(reg_greens$coefficients),
                      as.numeric(reg_linke$coefficients),
                      as.numeric(reg_spd$coefficients)),
          se = list(as.numeric(reg_afd$se),
                    as.numeric(reg_cducsu$se),
                    as.numeric(reg_fdp$se),
                    as.numeric(reg_greens$se),
                    as.numeric(reg_linke$se),
                    as.numeric(reg_spd$se)),
          p = list(as.numeric(reg_afd$coeftable[, 4]),
                   as.numeric(reg_cducsu$coeftable[, 4]),
                   as.numeric(reg_fdp$coeftable[, 4]),
                   as.numeric(reg_greens$coeftable[, 4]),
                   as.numeric(reg_linke$coeftable[, 4]),
                   as.numeric(reg_spd$coeftable[, 4])),
          omit.stat = "all",
          add.lines = list(c("Observations", 
                             reg_afd$nobs, reg_cducsu$nobs, reg_fdp$nobs, 
                             reg_greens$nobs, reg_linke$nobs, reg_spd$nobs), 
                           c("R-squared", 
                             round(r2(reg_afd)[2], digits = 3), 
                             round(r2(reg_cducsu)[2], digits = 3),
                             round(r2(reg_fdp)[2], digits = 3),
                             round(r2(reg_greens)[2], digits = 3),
                             round(r2(reg_linke)[2], digits = 3),
                             round(r2(reg_spd)[2], digits = 3)),
                           c("Adj. R-squared", 
                             round(r2(reg_afd)[3], digits = 3), 
                             round(r2(reg_cducsu)[3], digits = 3),
                             round(r2(reg_fdp)[3], digits = 3),
                             round(r2(reg_greens)[3], digits = 3),
                             round(r2(reg_linke)[3], digits = 3),
                             round(r2(reg_spd)[3], digits = 3))),
          covariate.labels = c("Competitor salience",
                               "Public salience (t-1)",
                               "External event", 
                               "Manifesto salience",
                               "Press release salience (t-1)",
                               "Constant"),          
          model.numbers = FALSE,
          column.labels = c("AfD", "CDU/CSU", "FDP", "Grüne", "Linke", "SPD"),
          notes = "Standard errors clustered by issue.",
          label = "a11")

```

